.class public Lorg/teleal/cling/Main;
.super Ljava/lang/Object;
.source "Main.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static main([Ljava/lang/String;)V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .line 1
    sget-object p0, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v0, "Starting Cling..."

    invoke-virtual {p0, v0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 2
    new-instance p0, Lorg/teleal/cling/UpnpServiceImpl;

    const/4 v0, 0x1

    new-array v0, v0, [Lorg/teleal/cling/registry/RegistryListener;

    new-instance v1, Lorg/teleal/cling/Main$1;

    invoke-direct {v1}, Lorg/teleal/cling/Main$1;-><init>()V

    const/4 v2, 0x0

    aput-object v1, v0, v2

    invoke-direct {p0, v0}, Lorg/teleal/cling/UpnpServiceImpl;-><init>([Lorg/teleal/cling/registry/RegistryListener;)V

    .line 3
    invoke-interface {p0}, Lorg/teleal/cling/UpnpService;->getControlPoint()Lorg/teleal/cling/controlpoint/ControlPoint;

    move-result-object v0

    new-instance v1, Lorg/teleal/cling/model/message/header/STAllHeader;

    invoke-direct {v1}, Lorg/teleal/cling/model/message/header/STAllHeader;-><init>()V

    invoke-interface {v0, v1}, Lorg/teleal/cling/controlpoint/ControlPoint;->search(Lorg/teleal/cling/model/message/header/UpnpHeader;)V

    .line 4
    sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v1, "Waiting 10 seconds before shutting down..."

    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    const-wide/16 v0, 0x2710

    .line 5
    invoke-static {v0, v1}, Ljava/lang/Thread;->sleep(J)V

    .line 6
    sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v1, "Stopping Cling..."

    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 7
    invoke-interface {p0}, Lorg/teleal/cling/UpnpService;->shutdown()V

    return-void
.end method
